projects
/
xen.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bb5e8c6
)
Fix xm vcpu-set command for when wrong number of VCPU is given
author
Ewan Mellor
<ewan@xensource.com>
Mon, 26 Feb 2007 15:41:35 +0000
(15:41 +0000)
committer
Ewan Mellor
<ewan@xensource.com>
Mon, 26 Feb 2007 15:41:35 +0000
(15:41 +0000)
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
tools/python/xen/xend/XendDomainInfo.py
patch
|
blob
|
history
diff --git
a/tools/python/xen/xend/XendDomainInfo.py
b/tools/python/xen/xend/XendDomainInfo.py
index 69e1cda45d9d089a836a7c7a97d4b7e38732022b..259898bdfdb0780b2ed93d6302dbecac9e080f31 100644
(file)
--- a/
tools/python/xen/xend/XendDomainInfo.py
+++ b/
tools/python/xen/xend/XendDomainInfo.py
@@
-938,6
+938,9
@@
class XendDomainInfo:
return self.info['vcpus_number']
def setVCpuCount(self, vcpus):
+ if vcpus <= 0:
+ raise XendError('Invalid VCPUs')
+
self.info['vcpu_avail'] = (1 << vcpus) - 1
if self.domid >= 0:
self.storeVm('vcpu_avail', self.info['vcpu_avail'])